package com.kakarote.hrm.controller;

import com.kakarote.core.common.Result;
import com.kakarote.hrm.entity.BO.QueryEmployeeDataBo;
import com.kakarote.hrm.entity.PO.HrmEmployeeDataMobilizeRecord;
import com.kakarote.hrm.service.IHrmEmployeeDataMobilizeRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * <p>
 * 人员异动记录 前端控制器
 * </p>
 *
 * @author guomenghao
 * @since 2021-04-14
 */
@RestController
@RequestMapping("/hrmEmployeeDataMobilizeRecord")
@Api(tags = "员工管理-人员异动记录")
public class HrmEmployeeDataMobilizeRecordController {

    @Autowired
    private IHrmEmployeeDataMobilizeRecordService hrmEmployeeDataMobilizeRecordService;

    @PostMapping("/addMobilizeRecord")
    @ApiOperation("添加异动记录")
    public Result addMobilizeRecord(@RequestBody HrmEmployeeDataMobilizeRecord employeeDataMobilizeRecord) {
        hrmEmployeeDataMobilizeRecordService.addMobilizeRecord(employeeDataMobilizeRecord);
        return Result.ok();
    }

    @PostMapping("/queryPageList")
    @ApiOperation("分页查询异动记录")
    public Result queryPageList(@RequestBody QueryEmployeeDataBo queryEmployeeDataBo) {
        return Result.ok(hrmEmployeeDataMobilizeRecordService.queryPageList(queryEmployeeDataBo));
    }
}

